package com.book.book.exception;

import com.book.book.vo.Resultvo;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class globalerexecptionHandler {

    @ExceptionHandler
    @ResponseBody
    public Resultvo error(Exception e) {
        e.printStackTrace();
        return Resultvo.error(e.getMessage());
    }

}
